home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mail Madness! 30
/
Mail_Madness_30_200x_-_Side_B.d64
/
temple of doom
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2023-02-26
|
9KB
|
336 lines
2 rem ******************
3 rem * the temple *
4 rem * of doom. *
5 rem * version--3 *
6 rem ******************
7 poke775,200
8 u$="0:":w$=",s,r":z=1:d=0:s=54272:ml=15:b=0:ef=.99
9 l$="[218]":gs=1:dima$(21)
10 print"[147]":poke53280,0:poke53281,0
12 print" [164][164][162][162][162] [146] the temple of doom [146][162][162][162][164][164]"
13 print"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
15 print" distributed by: [154]jiantware"
20 ifre<>1thengosub2000
30 printtab(9)"[213][195][195][201] [213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]"
31 printtab(9)"[194]f1[194] [194]to play [194]"
32 printtab(9)"[194] [194] [194] [194]"
33 printtab(9)"[194]f3[194] [194]for instructions[194]"
34 printtab(9)"[194] [194] [194] [194]"
35 printtab(9)"[194]f5[194] [194]view items [194]"
36 printtab(9)"[194] [194] [194] [194]"
37 printtab(9)"[194]f7[194] [194]view credits [194]"
38 printtab(9)"[202][195][195][203] [202][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][203]"
40 geta$:ifa$=""then40
45 ifa$="[133]"then50
46 ifa$="[134]"then1600
47 ifa$="[135]"then1690
48 ifa$="[136]"then1640
49 goto40
50 gosub1710
51 gosub2600
52 gosub2070
95 pp=p:p1=p+54272
99 gosub852
100 pokep,ch:pokep1,1
110 print"":print"[156]level:";lv;lv$
115 print"[145]score:";sc
120 print"[145]lives:";li
130 ifpeek(p+40)<>32thengoto1000
135 pokes+24,15:pokes+6,9:pokes+5,10:pokes+1,240:pokes+4,17
140 p=p+40:p1=p1+40
145 ifsc>999999thensc=0:print" "
150 print"":print"[156]level:";lv;lv$
155 print"[145]score:";sc
160 print"[145]lives:";li
170 pokep,ch:pokep1,1
180 pokep-40,32:pokep1-40,0
190 pokes+4,16:goto130
200 pokep,ch:pokep1,1
214 gosub2500
215 ifge>efthengosub 400
220 jy=peek(56320):fr=jyand16:jy=15-(jyand15)
221 getq$:ifq$=""then225
222 ifq$="k"thengosub1908:goto700
223 ifq$="p"then2700
225 iffr=0thengoto300
230 ifjy=0thengoto200
231 pokep,32:pokep1,0
240 ifjy=8thenp=p+1:p1=p1+1:c=1
250 ifjy=4thenp=p-1:p1=p1-1:c=-1
260 ifpeek(p)<>32thenp=p-c:p1=p1-c
270 pokep,ch:pokep1,1
271 ifc=1andch=114thench=115:goto280
272 ifc=1thench=114
273 ifc=-1andch=116thench=117:goto280
274 ifc=-1thench=116
280 goto130
284 ifsc=>x3andsc<x2thenx3=sc
300 ifpeek(p-40)<>32thengoto1100
301 pokes+24,5:pokes+6,9:pokes+5,11:pokes+1,2:pokes+4,129
303 pokep,32:pokep1,0
304 gosub2500
305 ifge>efthengosub400:goto130
310 p=p-40:p1=p1-40
320 pokep,118:pokep1,1
330 fort=1to50:next
340 pokep,32
350 jy=peek(56320):fr=jyand16:jy=15-(jyand15)
360 ifjy=8thenp=p+1:p1=p1+1:c=1
370 ifjy=4thenp=p-1:p1=p1-1:c=-1
380 ifpeek(p)<>32thenp=p-c:p1=p1-c:goto130
390 iffr=0thenpokes+4,128:goto300
395 goto100
400 :
405 pokep,ch:pokep1,1
410 a=int(rnd(1)*20)+1:a=a*40
420 en=e+a:cu=en
430 ifen<1102oren>1902then410
440 ifpeek(en)<>32then410
445 sh=rnd(1):ifsh=<.49thenf=107:fc=8:co=32:dl=20
446 iffc=8thengosub1910
450 ifsh=>.50thenf=108:fc=1:co=108:cp=1:dl=0
452 ifpeek(en)<>32thengoto1200
453 iffc=1thenpoke54296,15:poke54296,0
455 pokeen,f:pokeen+cc,fc
456 fort=0todl:next
460 pokeen,co
461 en=en-1
465 goto452
470 iff=107thengoto499
475 ifpeek(cu)<>108thengoto499
476 pokecu,32:cu=cu-1:goto475
499 fc=0:return
620 :
640 data 254,254,254,0,247,247,247,0
641 data 0,28,20,28,8,62,8,8
642 data 119,119,119,34,34,34,0,0
643 data 0,0,34,34,34,119,119,119
644 data 255,219,253,255,159,251,251,255
645 data 0,0,32,67,254,67,32,0
646 data 0,0,16,40,36,66,129,0
647 data 0,0,0,0,24,60,102,219
648 data 0,0,60,60,60,60,0,0
649 data 0,0,0,124,254,124,56,16
650 data 254,254,254,0,247,247,247,0
651 data 24,126,62,124,63,56,8,4
652 data 14,14,28,46,73,12,58,2
653 data 14,14,24,110,8,20,36,32
654 data 112,112,56,116,146,48,92,64
655 data 112,112,24,118,16,40,36,4
656 data 56,56,16,254,16,56,40,40
657 data 1,3,7,0,23,55,119,0
658 data 128,192,224,0,232,236,238,0
659 data 254,126,62,0,15,7,3,0
660 data 255,254,252,0,240,224,192,0
700 :
710 li=li-1:ifli=0then800
715 ifcp=1thengosub475
720 fort=0to200:next:pokep,32:p=pp:p1=p+54272:goto100
739 pokep,32
740 gosub1915
741 ifpeek(p-40)<>32then710
742 p=p-40:p1=p1-40:pokep,113:pokep1,12
743 fort=0to50:next:pokep,32:goto741
750 ifpeek(p+40)<>32then710
755 p=p+40:p1=p1+40:pokep,ch:pokep1,1
760 fort=0to50:next:pokep,32:goto750
800 :
805 cn=1
806 print"0[146]"
810 print"":printtab(14)"[159][213][195][195][195][195][195][195][195][195][195][201]":printtab(14)"[145][194]game over[159][194]"
811 printtab(14)"[202][195][195][195][195][195][195][195][195][195][203]":fort=0to900:next:print""
812 printtab(11)"[213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]"
813 ifb>10thenprint"[145][145]":goto816
814 printtab(11)"[145][194][154]button[146] quit [194]"
815 printtab(11)"[194] [194]"
816 printtab(11)"[145][194][154] up [146] re-start[194]"
817 printtab(11)"[202][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][203]"
825 gosub2300
826 gosub1910
830 ifre=1thensc=0:li=3:b=0:ef=.99:goto10
835 ifre=2thensys64738
850 :
852 pokep,ch:pokep1,0:t=81:gosub1922:fort=0to200:next
853 pokep1,11:t=62:gosub1922:fort=0to200:next
855 pokep1,12:t=45:gosub1922:fort=0to200:next
860 pokep1,15:t=28:gosub1922:fort=0to200:next
862 pokep1,1:t=12:gosub1922:pokes+4,0:return
940 :
950 pokep,ch:pokep1,1:t=12:gosub1922:fort=0to200:next
952 pokep1,15:t=28:gosub1922:fort=0to200:next
954 pokep1,12:t=45:gosub1922:fort=0to200:next
956 pokep1,11:t=62:gosub1922:fort=0to200:next
958 pokep1,0:t=81:gosub1922:fort=0to200:next:pokes+4,0:return
1000 :
1010 ifpeek(p+40)=>102andpeek(p+40)=<104thengoto200
1011 ifpeek(p+40)=>121andpeek(p+40)=<122thengoto200
1015 ifpeek(p+40)=119thensl=39:ch=116:goto1500
1016 ifpeek(p+40)=120thensl=41:ch=114:goto1500
1020 ifpeek(p+40)=105thengosub1908:goto710
1030 ifpeek(p+40)=106then739
1040 ifpeek(p+40)=109thensc=sc+50:gosub1905:goto140
1050 ifpeek(p+40)=110thensc=sc+75:gosub1905:goto140
1060 ifpeek(p+40)=111thensc=sc+100:gosub1905:goto140
1070 ifpeek(p+40)=112thengosub1917:pokep,32:p=p+80:p1=p1+80:goto1190
1100 ifpeek(p-40)=102then130
1101 ifpeek(p-40)=112then130
1102 ifpeek(p-40)=>119andpeek(p-40)=<122then130
1103 if peek(p-40)=>109andpeek(p-40)=<111then130
1104 ifpeek(p-40)=105then130
1110 ifpeek(p-40)=104thengosub1908:goto750
1120 ifpeek(p-40)=103thengosub950:gosub1912:gosub1710:gosub2600:gosub2090:goto95
1190 pokep,ch:pokep1,1:goto190
1199 :
1200 ifpeek(en)=>114andpeek(en)=<117thengosub1908:goto710
1210 pokeen+1,32:goto470
1300 :
1310 print"[153] level [157][157][157]";
1320 c$="-":q=2:g$=""
1325 printc$"[157]";
1330 getq$
1335 ifq$=chr$(13)then1375
1340 ifq$=chr$(20)theniflen(g$)>0theng$=left$(g$,len(g$)-1):goto1370
1350 ifq$=>"0"andq$=<"9"then1360
1355 goto1325
1360 iflen(g$)<qthenprintq$;:g$=g$+q$
1365 goto1325
1370 print"[157] [157]";:goto1325
1375 print" ":l=val(g$):ifl=0then1310
1376 ifl>10then1310
1377 gosub1908:print" level [157][157][157]";g$
1378 b=l:return
1500 :
1510 p=p+sl:p1=p1+sl
1520 pokep,ch:pokep1,1
1530 pokep-sl,32
1535 ifpeek(p+sl)=32thengoto130
1540 goto1000
1600 rem *** instructions ***
1610 poke53280,0:poke53281,0:print"[147]"
1620 print">[156]the object of the game is to collect"
1621 print"all of the treasure on each of"
1622 print"15 levels. you may not always be able"
1623 print"to get all of the treasures on every"
1624 print"level. to get a treasure you must fall"
1625 print"on it from above."
1626 print">[156]you may leave a level at any time by"
1627 print"touching an onk ([167]) from the bottom."
1628 print">[156]you get an extra man every third level."
1629 print">[156]use the joystick in port #2."
1630 print" press any key to continue"
1631 geta$:ifa$=""then1631
1632 print"[147]":print">[156]at any time you can pause the game by"
1633 print"pressing 'p'."
1634 print">[156]if you ever get trapped and need to"
1635 print"kill yourself you can press 'k'."
1636 print" press any key to continue"
1637 geta$:ifa$=""then1637
1638 re=1:goto10
1640 rem *** credits ***
1641 poke53280,0:poke53281,0:print"[147]"
1642 print"game design and concept by: [156]jamie cross"
1643 print" i spent many hours working on this"
1644 print"program, and feel that the time was"
1645 print"well spent. i think you will find this"
1646 print"game entertaining and challenging for"
1647 print"quite awhile. if you do find that you"
1648 print"like this game i would greatly"
1649 print"appreciate any contribution you could"
1650 print"make. it would surely increase the"
1651 print"likely hood of any sequals or expansion"
1652 print"levels. if you can make a contribution,"
1653 print"include your return address and i will"
1654 print"notify you if there are any expansion"
1655 print"levels. i would send you them free if"
1656 print"you were to send me a disk and a sase."
1657 print"if you can't make a contribution or"
1658 print"if you feel the game doesn't deserve"
1659 print"one. id still like to hear what you"
1670 print"think of the program."
1671 print" press any key to continue"
1672 geta$:ifa$=""then1672
1673 print"[147]"
1674 print"my address is: [156]jamie cross"
1675 printtab(16)"130 castle dr #23"
1676 printtab(16)"bethle park, pa"
1677 printtab(16)"15102"
1678 print" i hope you enjoy the game!"
1679 print" [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
1680 print" press any key to continue"
1681 geta$:ifa$=""then1681
1682 re=1:goto10
1690 rem *** items ***
1691 poke53280,0:poke53281,0:print"[147]"
1692 print" items":print" [163][163][163][163][163]"
1693 printtab(13)"arrow ------ [149][171]":printtab(13)"lightening - [172][172]"
1694 printtab(13)"jewel ------ [153][175]":printtab(13)"gold block - [158][174]"
1695 printtab(13)"gold coins - [158][173]":printtab(13)"lava ------- [170]"
1696 printtab(13)"onk -------- [167]":printtab(13)"spikes ----- [152][168] [169]"
1697 print" beware:"
1698 print"[156] there may be other hidden dangers!"
1699 print" press any key to continue"
1700 geta$:ifa$=""then1700
1701 re=1:goto10
1710 ifgs=1thenb=b+1
1715 ifb>mlthenb=1:ef=ef-.02:lv$=lv$+l$
1720 lv=b
1726 ifd/2=int(z)thenli=li+1:z=z+1
1727 d=d+1
1730 return
1900 :
1905 pokes+24,15:pokes+1,104:pokes+4,17:pokes+5,10:pokes+6,9:pokes+4,16:return
1908 pokes+24,15:pokes+1,15:pokes+6,9:pokes+5,10:pokes+4,17:fort=1to60:next
1909 pokes+1,12:fort=1to70:next:pokes+4,16:return
1910 pokes+24,15:pokes+1,6:pokes+6,9:pokes+4,33:pokes+5,10:pokes+4,32:return
1912 pokes+24,15:pokes+4,17:pokes,100:pokes+5,17:pokes+6,241:fort=0to255
1913 pokes+1,t:next:pokes+4,0:return
1915 pokes+24,15:pokes+1,7:pokes+5,25:pokes,240:pokes+4,129:return
1917 pokes+24,15:pokes+6,9:pokes+5,10:pokes+1,240:pokes+4,17:pokes+4,16:return
1919 pokes+24,15:pokes,29:pokes+1,134:pokes+5,132:pokes+6,128:pokes+15,67
1920 pokes+14,14:pokes+4,19:fort=0to80:next:pokes+4,0:return
1922 pokes+24,15:pokes+6,9:pokes+5,10:pokes+1,t:pokes+4,17:poke2+4,16:return
2000 c=6:poke53272,(peek(53272)and240)or2*c
2010 q=53248:e=55296:n=12288
2020 poke56333,127:poke1,51
2030 l=e-q:en=l+n
2031 a%=l/256:a=l-256*a%:v=en-a:b%=v/256:w=en-256*b%-a:vv=e-a:c%=vv/256
2035 c=e-256*c%-a
2040 poke781,a%+1:poke782,a:poke90,c:poke91,c%:poke88,w:poke89,b%:sys41964
2045 poke1,55:poke56333,129
2050 poke56,48
2060 forda=13104to13271:readgr:pokeda,gr:next
2065 return
2070 lv=b:sc=0:li=3:cc=54272:ch=114:e=1102
2090 fort=1024to1063:poket,102:poket+cc,bc:next:fort=1904to1943:poket,102
2100 poket+cc,bc:next:fort=1064to1904step40:poket,102:poket+cc,bc:next
2110 fort=1063to1943step40:poket,102:poket+cc,bc:next
2111 fort=0to1500:next
2115 fort=1944to1983:poket,160:poket+cc,4:next:fort=1984to2023:poket,160
2116 poket+cc,4:next
2130 return
2300 :
2310 jy=peek(56320):fr=jyand16:jy=15-(jyand15)
2311 ifb>10thengoto2321
2320 iffr=0thengosub1908:re=2:return
2321 ifcn=1andjy=1thenre=1:return
2330 goto 2310
2500 :
2510 ge=rnd(1)
2520 return
2600 :
2605 v$="b"+str$(b)
2610 open2,8,2,u$+v$+w$
2620 fori=0to21:input#2,a$(i):nexti
2630 input#2,p
2640 input#2,bc
2650 print"[147]":poke53280,3:poke53281,0
2660 fori=0to21:print"[145]"a$(i):next
2670 close2
2680 return
2700 :
2701 gosub1919
2702 poke53280,14
2705 getq$:ifq$<>"p"then2705
2706 gosub1919
2710 poke53280,3:goto100